package cn.jee.repositories;

import cn.jee.entity.CollectionDemo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.Optional;

public interface CollectionDemoRepository extends JpaRepository<CollectionDemo, Long> {
  @Query("FROM CollectionDemo c JOIN  FETCH c.keywords")
  Optional<CollectionDemo> findByIdByJpql(long id);
}